<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/6
 * Time: 15:17
 */
namespace App\Tool;

use phpDocumentor\Reflection\Types\Self_;

class Error{
    const OK = 200;

    const SYSTEM_BUSY = -1;
    //注册
    const ALREADY_REGISTER = -300;
    const REGISTER_FAIL = -301;
    //登陆
    const USERNAME_NULL = 302;
    const PASSWORD_ERROR = 303;
    const UPDATE_PASSWORD_FAIL = 304;
    const USER_BLACKLIST = 305;
    const PASSWORD_NULL = 306;
    const OLD_PASSWORD_ERROR = 307;
    //修改密码
    const TWO_PASSWORD_ERROR = 308;

    //分类删除 分类下还有状态
    const ERROR_DEL_HAVEDETAIL = 309;
    //跟进少于5个汉字
    const CONTENT_LESS_THAN_FIVE = 310;
    const CONTENT_LESS = 311;
    const CREATE_TABLE_ERROR = 312;
    const  NO_TYPE = 313;
    const  AUDIT = 314;
    const  NO_RENEWAL = 315;
    const  PLEASE_CONTACT_ADMIN = 316;
    const  EXAMINE_FAIL = 317;
    const  ACCOUNT_DISABLE = 318;
    const  ACCOUNT_DEL = 319;
    //重置密码
    const RESET_PASSWORD = 320;
    const NOT_PART_RECYCLE = 321;


    //楼盘字典
    const REPEATED_PROPERTY = 322;
    const NO_PROPERTY = 323;
    /**
     * 请求参数
     */
    const PARAM_MISSING = -403;
    const NULL_DATA     = -404;
    const ADD_ERROR     = -400;
    const REPAET_ADD    = -4001;
    const DEL_ERROR     = -401;
    const EDIT_ERROR    = -402;
    const USER_EXIST    = -405;
    //续费失败
    const PAY_ERROR     = -406;
    const EDIT_PAY_ERROR     = -407;
    const OPERATION_ERROR     = -408;


    //模块
    const MODULE_ADD_FAILD = 500101;
    const MODULE_DEL_FAILD = 500102;
    const MODULE_ONE_FAILD = 500103;
//  权限
    const AUTHORITY_ADD_FAILD = 500104;
    const AUTHORITY_DEL_FAILD = 500105;
    const AUTHORITY_ONE_FAILD = 500106;
    const POSITION_ADD_FAILD  = 500107;
    const POSITION_DEL_FAILD  = 500108;
    const POSITION_ONE_FAILD  = 500109;
    const POSITION_EDIT_FAILD  = 500110;

    // 上传图片
    const UPLOAD_ERROR = -600101;
    const UPLOAD_SUFFIX_ERROR = -600102;
    const FILE_ERROR = -600103;


    const MSG = [
        //注册
        self::ALREADY_REGISTER  => '该账号已经注册',
        self::REGISTER_FAIL => '注册失败',
        //登陆
        self::USERNAME_NULL => '用户名不存在',
        self::PASSWORD_ERROR => '密码错误',
        self::UPDATE_PASSWORD_FAIL => '修改密码失败',
        self::USER_BLACKLIST => '该用户被加黑',
        self::PASSWORD_NULL => '没有设置支付密码请前去设置',
        self::OLD_PASSWORD_ERROR => '旧密码输入错误',
        self::PARAM_MISSING => '参数缺少',
        self::NULL_DATA => '暂无数据',
        self::ADD_ERROR => '添加失败',
        self::REPAET_ADD => '手机号已存在',
        self::DEL_ERROR => '删除失败',
        self::EDIT_ERROR => '修改失败',
        self::OPERATION_ERROR => '操作失败',
        self::USER_EXIST => '用户不存在',
        //修改密码
        self::TWO_PASSWORD_ERROR => '新密码两次输入不一致',
        //删除分类
        self::ERROR_DEL_HAVEDETAIL => '删除失败，该分类下存在状态',
        //跟进小于5个汉字
        self::CONTENT_LESS_THAN_FIVE  => '跟进内容太少不能录入',
        self::CONTENT_LESS  => '跟进内容不能为空',
        self::CREATE_TABLE_ERROR  => '表创建失败',
        self::NO_TYPE  => '该分类不存在!',
        self::AUDIT  => '公司还在审核中不能登录!',
        self::NO_RENEWAL  => '公司使用时间已过期，请及时续费!',
        self::PLEASE_CONTACT_ADMIN  => '未知错误，请联系管理员',
        self::EXAMINE_FAIL  => '审核失败',
        self::ACCOUNT_DISABLE  => '账号被禁用',
        self::ACCOUNT_DEL  => '账号被删除',
        //重置密码
        self::RESET_PASSWORD  => '密码重置失败，请稍后重试！',
        self::NOT_PART_RECYCLE  => '该信息不属于回收站信息，不能删除！',
        //楼盘字典
        self::REPEATED_PROPERTY  => '该楼盘已存在，不能重复添加！',
        self::NO_PROPERTY  => '该楼盘不存在',

        //续费失败
        self::PAY_ERROR  =>  '续费提交失败',
        self::EDIT_PAY_ERROR  =>  '审核续费失败',

        //模块
        self::AUTHORITY_ADD_FAILD => '模块添加失败',
        self::AUTHORITY_DEL_FAILD => '模块删除失败',
        self::AUTHORITY_ONE_FAILD => '模块不存在',
        //权限
        self::MODULE_ADD_FAILD => '模块添加失败',
        self::MODULE_DEL_FAILD => '模块删除失败',
        self::MODULE_ONE_FAILD => '模块不存在',
        //职位
        self::POSITION_ADD_FAILD  => '职位添加失败',
        self::POSITION_DEL_FAILD  => '职位删除失败',
        self::POSITION_ONE_FAILD  => '职位不存在',
        self::POSITION_EDIT_FAILD => '职位修改失败',

        // 上传图片
        self::UPLOAD_ERROR => '上传图片失败',
        self::UPLOAD_SUFFIX_ERROR => '图片后缀名错误',
        self::FILE_ERROR => '文件不合法',
    ];
}